<?php
class Register
{
    private static $_depository = array();

    public static function getObject($key)
    {
        if (!array_key_exists($key, self::$_depository)) return null;
        return self::$_depository[$key];
    }

    public static function setObject($key, $value)
    {
        self::$_depository[$key] = $value;
    }
}

?>